

var api = require('../../utils/api.js')



Page({

    /**
     * 页面的初始数据
     */
    data: {
        lists:[]
    },

    /**
     * 生命周期函数--监听页面加载
     */
    onLoad(options) {
        var that=this;
        api.get({
            url: 'index/getrule' ,
            data: {},
            success: data => {
                console.log(data);

                that.setData({
                    lists:data.data
                })

            },
            fail: err => {
                wx.hideNavigationBarLoading();
            }
        });
    },

    seeinfo(ret){
        console.log(ret);

            var id=ret.currentTarget.dataset.id;

            wx.navigateTo({
              url: '/pages/rule/info?id='+id
            })
    }
    
})